<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>在线支付</title>
    <!--<meta http-equiv="Access-Control-Allow-Origin" content="*">-->
    <link rel="stylesheet"  type="text/css" href="/order/css/base.css?V=686">
    <link rel="stylesheet" type="text/css" href="/order/css/save1.css?V=686">
    <link rel="stylesheet" type="text/css" href="/order/css/success.css?V=686">
    <style type="text/css">
        #index {
            max-width: 750px;
            width: 100%;
            display: block;
            min-height: 100%;
            margin: 0 auto;
        }

        #box1 {
            margin: 0 auto;
        }
    </style>
</head>

<body>
<div id="index">
    <div class=''></div>
    <!--<div class="importTc" id="importTc">
        <div class="tc_container">
            <p class="im_title">重要提醒</p>
            <i class='close'>
                <img src="/order/image/icon_close.png" alt="">
            </i>
            <div class="content">
                <p>1. 付款金额一定要精确到小数点后两位。比如：界面提醒付款金额为100.39元，您支付的时候一定要支付100.39，一分不能少。</p>
                <p>2. 支付成功之后须返回到充值订单详情页，点击页面下方的蓝色按钮 <span class="red">「我已付款」</span>，否则充值将无法到账；</p>
                <p>3. 每天只有3次取消充值的机会，如果3次都取消了，那么今天无法使用充值。 </p>
                <p>4. 充值支持充值金额100-10万元不等，请放心充值。（注意付款小数点）</p>
            </div>
            <div class="bottom">
                <p class='blue'>为了方便您充值能够快速到账，建议查看充值教程</p>
                <p style="text-align: center;">
                    <input type="checkbox" id="checkInp" style='display: none'> <label for="checkInp" id="imLabel" style='line-height: 44px;display: block;'> <span class="check_icon"></span> 不再提醒</label>
                    <button class="button">继续充值</button>
                </p>
            </div>
        </div>
    </div>-->
    <div class="importTc" id="bankTc" style="display:none">
        <div class="tc_container">
            <i class='close'>
                <img src="/order/image/icon_close.png" alt="">
            </i>
            <div class="yun_top">
                <img src="/order/image/icin_ysf_white@2x.png" alt="">
                <p class='yun_title'>推荐使用</p>
            </div>
            <div class="yun_bottom">
                <p style="font-size:18px;margin-bottom:20px;text-align: center;">支持扫码支付的手机银行APP</p>
                <img src="/order/image/icons_ysfapp@2x.png" alt="">
            </div>
        </div>
    </div>
    <div class="importTc" id="fkTc" style="display: none">
        <div class="tc_container">
            <p class="im_title">确认付款</p>
            <i class='close'>
                <img src="/order/image/icon_close.png" alt="" style="height:28px;">
            </i>
            <div class="content">
                <p>1. 请选择填写付款留言，注明您已经完成付款的金额、<span class="pay_type">微信</span>姓名或昵称，以便可以更快的确认充值到账。 </p>
                <p>2. 若您尚未转账给对方，请不要点击 <span class="red">「确认已付款」</span>按钮，以免造成充值纠纷以及可能的信用降级。</p>
            </div>
            <div class="bottom">
                <div class="text">
                    <div><span class='left'><span class="pay_type">微信</span>转账金额</span><input type="text" id="money3">
                        <div class="clear"></div>
                    </div>
                </div>
                <p style="text-align: center;margin-top:15px;display: flex;justify-content: center;">
                    <button class="button">
                        确定已付款
                    </button>
                    <button class="cancel_button">关闭</button>
                </p>
            </div>
        </div>
    </div>
    <div class="importTc" id="cancelTc" style='display: none;'>
        <div class="tc_container">
            <p class="im_title">取消交易</p>
            <i class='close'>
                <img src="/order/image/icon_close.png" alt="">
            </i>
            <div class="select_div">
                <p class='active'><input type="checkbox" class="checkbox" checked id="select1" data-mode="1"><label for="select1">我不想充值了</label></p>
                <p><input type="checkbox" class="checkbox" id="select2" data-mode="2"><label for="select2">我是新手，没搞清楚怎么充值</label></p>
                <p><input type="checkbox" class="checkbox" id="select3" data-mode="3"><label for="select3">商家收款方式异常，我付不了款</label></p>
                <p><input type="checkbox" class="checkbox" id="select4" data-mode="4"><label for="select4">其他</label></p>
                <textarea name="" id="otherText" disabled></textarea>

            </div>
            <div class='button_div'>
                <button class="back">我再想想</button>
                <button class="cancel">确认取消</button>
            </div>
        </div>
    </div>
    <div class="mask"></div>
    <div class="tishi_tc" id="alert_tc">
        <p class="info" id="tc_info"></p>
        <div class="button_div">
            <button class='sure' onclick="hideTc()">确定</button>
        </div>
    </div>
    <div class="tishi_tc hide" id="alert_tc2">
        <p class="info" id="tc_info2">请 <span class="red">转账</span> 付款 <span class="red money"></span>元 <br>付错金额的损失自己承担! </p>
        <div class="button_div">
            <button class='sure' onclick="hideTc2()"  id="copy14" data-clipboard-target="#money">我知道了</button>
        </div>
    </div>
    <div class="container">
        <div id="state_box1" style="padding:20px;height:100vh;background: #FFF;display: flex;flex-direction: column;justify-content: center;" key='skip'>


            <div class="img_box" style="text-align: center;margin-bottom:30px">
                <img style="height:28px" src="/order/image/logo_zhifubao@2x.png">
                <img style="height:28px;display: none" src="/order/image/logo_bank@2x.png" alt="">
                <img style="height:28px;display: none" src="/order/image/logo_weixin@2x.png" alt="">
                <img style="height:28px;display: none" src="/order/image/icon_qqqianbao@2x.png" alt="">
                <img style="height:28px;display: none" src="/order/image/logo_ysf@2x.png" alt="">
            </div>
            <div class="text_div">
                <p>正在连接支付页面，15秒后自动重连，不需要关闭窗口！</p>
                <p>……</p>
            </div>

        </div>
        <div id="info_box">
            <div>
                <!--<div class="fcTishi hide">
                    <p class='left'>单次收款码<br>禁止多次支付！</p>
                    <img src="/order/image/btn_zdl@2x.png" alt="" style="width:44px">
                </div>	-->
                <div id="state_box2">
                    <header>
                        <div class="head_box">
                            <img id="icon1" src="/order/image/icon_qqqianbao@2x.png" alt="" hidden>
                            <img id="icon2" src="/order/image/logo_bank@2x.png" alt="" hidden>
                            <img id="icon3" src="/order/image/logo_weixin@2x.png" alt="" hidden>
                            <img id="icon4" src="/order/image/logo_zhifubao@2x.png" hidden>
                            <img id="icon5" src="/order/image/logo_ysf@2x.png" hidden>
                        </div>
                    </header>
                    <div class='bottom_div'>
                        <div style="display: flex;justify-content: center;" id="fkDiv">
                            <button class="fk_button" disabled>我已付款 <span id="money2">0.00</span>元</button>
                            <button class="cancel_button" disabled>取消</button>
                        </div>
                        <button class="press_button" id="pressButton">催款</button>
                    </div>
                    <div class="top_info">
                        <span class="left" id="orderState">待付款</span>
                        <span class="right" style="margin-top:13px;">支付倒计时: <span id="js_time">0:00</span></span>
                        <div class='clear'></div>
                    </div>
                    <div id="box">
                        <p class='red_p'>重复支付和修改金额无法到账，概不负责<span class="red_arrow"></span></p>
                        <p class='red_p'>请注意：任何收款二维码有备注“延迟到账”的请不要支付！可以重新发起支付！<span class="red_arrow"></span></p>
                        <div class="zf_p" :class="pay_type=='banktrans'?'wid_p':''">
                            <div>
                                <div class="clear"></div>
                            </div>
                            <div>
                                <div id="box1">
                                    <!--<img src="/order/image/icon_qwsm@2x.png" alt="" class='ts_icon'>-->
                                    <p class="money" style="color: black;">请付 <span id="money">0.00</span> 元 </p>

                                    <button class="copy_button2" id="copy4" data-clipboard-target="#money" style="background: #FFF;font-size: 14px;margin:auto;display: block;height:24px;">复制金额</button>
                                    <p class="order" style="text-align: center">
                                        <span>订单号： </span>
                                        <span>
													<span id="order_id">0000</span>
												<button class="copy_button2" data-clipboard-target="#order_id" id="copy5" style="background: transparent;margin-left:10px">复制</button>
												</span>
                                    </p>
                                    <div class="ewm_box">
                                        <div class="cancel_div">
                                            <img id="icon1" src="/order/image/icon_czcg@2x.png" alt="" style="width:160px;position:absolute;left:32.5px;top:20%;display: none;">
                                            <img id="icon2" src="/order/image/icon_ddcs@2x.png" alt="" style="width:160px;position:absolute;left:32.5px;top:20%;display: none;">
                                            <img id="icon3" src="/order/image/icon_ddqx@2x.png" alt="" style="width:160px;position:absolute;left:32.5px;top:20%;display: none;">
                                            <img id="icon4" src="/order/image/icon_ddfk@2x.png" alt="" style="width:160px;position:absolute;left:32.5px;top:20%;display: none;">
                                        </div>
                                        <img src="" alt="" id="ewmImg" style="width:100%;">
                                    </div>
                                    <div>

                                        <p class="ti_p">
                                            <span class="ticon icon1"></span><span class="arrow"><span></span><span></span></span> <span class="ticon icon2" id="type_icon"></span><span class="arrow"><span></span><span></span></span> <span class="ticon icon3"></span>
                                            <div class="ti_t">
                                                <div>
                                        <p>截屏将二维码<br>保存至本地相册</p>
                                    </div>
                                    <div>
                                        <p>打开<span class="pay_type">微信</span><br>选择扫一扫</p>
                                    </div>
                                    <div>
                                        <p>从本地相册选择<br>选取截屏二维码</p>
                                    </div>
                                </div>
                                <a id="tttt" hidden></a>
                                <div class="account_p">
                                    <div class="blue_box"><span class='left'>收款人</span><span class="right"><span id="userName">--</span><button style="margin-left:10px;" class="copy_button2" id="copy6" data-clipboard-target="#userName">复制</button></span>
                                        <div class='clear'></div>
                                    </div>
                                    <div class="blue_box"><span class='left'>收款账号</span><span class="right"><span id="userAccount">---</span><button style="margin-left:10px;" class="copy_button2" id="copy7" data-clipboard-target="#userAccount">复制</button></span>
                                        <div class='clear'></div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div id="box2">
                            <div class="yhk_box">
                                <div class="blue_box"><span id="card"></span> <button class="copy_button" id="copy1" data-clipboard-target="#card">复制卡号</button></div>
                                <div class="blue_box"><span id="name"></span>/<span id="bank_name"></span><button class="copy_button" id="copy2" data-clipboard-target="#name">复制姓名</button></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div id="yun_div">
                <div class="yun_text">
                    <p>支持扫码支付的手机银行APP：</p>
                    <div>
                        <span class="bank_name">工商银行</span><span class="bank_name">农业银行</span><span class="bank_name">中国银行</span><span class="bank_name">建设银行</span><span class="bank_name">交通银行</span>
                        <button class="moreBank">更多</button>
                    </div>
                </div>
                <a href="https://youhui.95516.com/hybrid_v3/html/help/download.html"  target="_blank" style="display:block;width:100%;"><img src="/order/image/AD_ysf@2x.png" alt="" style="width:100%;"></a>
            </div>
            <div class="tishi_div">
                截图扫码后请按如下示意图操作：
            </div>
            <p style="text-align: center;margin-top:14px">
                <img src="/order/image/jiantou@2x.png" alt="" style="width:30px;">
            </p>
            <div id="wx_tishi" style="display: none">
                <img src="/order/image/tishi_02.jpg" alt="" style="max-width: 335px;margin: 10px auto 0;">
            </div>
            <div id="zfb_tishi" style="display: none">
                <img src="/order/image/tishi_01.jpg" alt="" style="max-width: 335px;margin: 10px auto 0;">
            </div>
        </div>
        <div id="state_box3">
            <p class='title'>充值成功</p>
            <p class='text_p'>系统很快为您的充值入账</p>
            <div class="order_box">
                <p class="order_title">您的支付单号</p>
                <p class='order_number' id="order">0000</p>
                <button class="copy_button" id="copy3" data-clipboard-target="#order">复制单号</button>
            </div>
            <p class="tishi_p">当您的充值未在2分钟入账</p>
            <p class="tishi_p">您可以通过此订单号联系在线客服</p>
        </div>
    </div>
</div>
</div>
</div>
</body>
<script src="/order/js/jquery-2.2.4.min.js" type="text/javascript" charset="utf-8"></script>
<!--<script src="http://james.padolsey.com/demos/grayscale/grayscale.js"></script>-->
<script src="/order/js/clipboard.min.js"></script>
<script type="text/javascript" charset="utf-8">
    function activeFun(n) {
        n.show().siblings().hide();
    }

    function alertTc(n,m) {
        $(".mask").show();
        $("#alert_tc").show().find("#tc_info").html(n);
        $("#alert_tc").find(".sure").html(m);
    }

    function hideTc() {
        $(".mask").hide();
        $("#alert_tc").hide()
    }
    function hideTc2() {
        $(".mask").hide();
        $("#alert_tc2").hide()
        if(imTime==null){
            imTime=setTimeout(function(){
                if(!(app.pay_type=="yunqr" || app.pay_type=="qqqr")){
                    $fkTc.show();
                }
                $fkTc.find("#money3").val($("#money").text());
            },60000)
        }
    }
    function is_weix(){
        var ua = navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i)=="micromessenger") {
            return "wx"; //是微信
        }
        return false; //其他浏览器
    }
    var app = {
        new_info: 0,
        state: 1,
        status: 0,
        order_id: "0",
        order_type: 1,
        notify_cnt: 0,
        down_time: 10,
        order_timeout: 10,
        pay_type: 'aliqr',
        create_time: '',
        order_state: 1,
        is_phone: false,
        send_nick_name: '',
        recv_login_id: 0,
        send_login_id: 0,
        img_type: 2,
        userId: '',
        amount: "",
        countdown: '2′59″',
        card: "",
        order_sn: "",
        src: '',
        userName: '',
        bankName: '',
        contact: [],
        jisuClass1: false,
        jisuClass2: true
    };



    function selectPic() {
        $(".botto_div input").click();
    }

    function saveButton1() {
        $("#pc_button").css({
            background: "#0457C4",
            color: "#FFF",
            border: "none"
        })
    }

    function saveButton2() {
        $("#pc_button").css({
            background: "#FFF",
            color: "#0083E0",
            border: "1px solid #6EB7FF"
        })
    }

    function saveButton3() {
        $("#pc_button").css({
            background: "#0083E0",
            color: "#FFF",
            border: "none"
        })
    }

    //需要获取信息
    var dataTimer;

    function getBasicData() {
        var d = {};
        var state = 0;
        if(app.img_type != 1 && app.src == '') {
            state = 1;
        }
        $.ajax({
            url: "https://a.szfkks.cn/query/3865/23233134/1/1562427596/90477/4ed749df14611aa19c7a82761ecbb535" + "/" + state,
            data: d,
            dataType: "json",
            type: 'GET',
            async: false,
            success: function(json) {
                if(json.code == 1) {
                    alert(json.msg);
                    return false;
                }
                app.order_id=json.order_id;
                app.pay_type = json.pay_type;
                app.currency = json.currency;
                app.amount = json.amount;
                app.send_nick_name = json.send_nick_name;
                app.notify_cnt = json.notify_cnt;
                app.order_state = json.order_state;
                app.order_timeout = json.order_timeout;
                app.pay_type = json.pay_type;
                app.down_time = json.down_time;
                app.img_type = json.img_type;
                app.recv_login_id = json.recv_login_id;
                app.send_login_id = json.login_id;
                app.order_sn = json.order_sn;
                $("#money").text(app.amount);
                $("#money2").text(app.amount);
                $("#alert_tc2 .money").text(app.amount);
                $("#order_id").text(app.order_sn);
                $("#order").text(app.order_sn);
                if(app.pay_type == 'banktrans') {
                    $("#box2").show();
                    $("#box1").hide();
                } else {
                    $("#box2").hide();
                    $("#box1").show();
                }
                if(app.pay_type == 'aliqr') {
                    $(".account_p").hide();
                    $(".pay_type").html("支付宝");
                    $("#type_icon").addClass("icon_zfb");
                    $(".head_box #icon4").show();
                    $("#zfb_tishi").show();
                }
                else if(app.pay_type == 'wxqr'){
                    $(".account_p").hide();
                    $(".pay_type").html("微信")
                    $(".head_box #icon3").show();
                    $("#type_icon").addClass("icon_wx");
                    $("#wx_tishi").show();
                    // if(is_weix()=='wx'){
                    // 	$("#copy4").hide();
                    // 	$("#box1 .ts_icon").hide();
                    // 	$(".ti_p").parent().hide();
                    // 	$("#wx_div").show();
                    // }
                }
                else if(app.pay_type == 'yunqr'){
                    $(".account_p").hide();
                    $(".pay_type").html("云闪付")
                    $(".head_box #icon5").show();
                    $("#type_icon").addClass("icon_ysf");
                    $('#yun_div').show();
                    $('.tishi_div').css("display","none");
                    $('.tishi_div').next().css("display","none")
                }
                else if(app.pay_type == 'qqqr'){
                    $(".account_p").hide();
                    $(".pay_type").html("QQ钱包")
                    $(".head_box #icon1").show();
                    $("#type_icon").addClass("icon_qq");
                    $('.tishi_div').css("display","none");
                    $('.tishi_div').next().css("display","none")
                }
                else{
                    $(".account_p").hide();
                    $(".pay_type").html("银行卡")
                    $(".head_box #icon2").show();
                }
                if(app.order_state == 1) {
                    app.status = 1;
                    $("#state_box1").show();
                    $("#state_box2").hide();
                    $("#state_box3").hide();
                }
                else if(app.order_state==8){
                    app.state = 2;
                    $(".fk_button").attr("disabled",true);
                    $(".cancel_button").attr("disabled",true);
                    $("#fkDiv").hide().siblings().show();
                    $("#state_box2").show();
                    $("#state_box1").hide();
                    $("#state_box3").hide();
                    $(".cancel_div").show();
                    $(".cancel_div #icon4").show();
                    $("#orderState").html("待收款确认");
                    clearInterval(t)
                    if(json.must_img != 0) {
                        var str = json.img_text;
                        if(str != '') {
                            if(json.img_type == 1) {
                                var arr = str.split(",");
                                app.userName = arr[0];
                                app.card = arr[1];
                                app.bankName = arr[2];
                                $("#card").text(app.card);
                                $("#name").text(app.userName);
                                $("#bank_name").text(app.bankName);
                            } else {
                                app.src = str;
                                $("#ewmImg").attr("src", str);
                                $(".cancel_div").hide();
                            }
                        }
                    }
                } else if(app.order_state == 9) {
                    app.state = 2;
                    $(".fk_button").attr("disabled",false);
                    $(".cancel_button").attr("disabled",true);
                    $("#state_box3").show();
                    $("#state_box2").hide();
                    $("#state_box1").hide();
                    $(".cancel_div").show();
                    $(".cancel_div #icon1").show();
                    clearInterval(dataTimer)
                    clearInterval(t)
                    $("#js_time").text("00:00:00")
                    if(json.must_img != 0) {
                        var str = json.img_text;
                        if(str != '') {
                            if(json.img_type == 1) {
                                var arr = str.split(",");
                                app.userName = arr[0];
                                app.card = arr[1];
                                app.bankName = arr[2];
                                $("#card").text(app.card);
                                $("#name").text(app.userName);
                                $("#bank_name").text(app.bankName);
                            } else {
                                app.src = str;
                                $("#ewmImg").attr("src", str);
                                $(".cancel_div").hide();
                            }
                        }
                    }
                } else if(app.order_state == 4 || app.order_state == 14 || app.order_state == 3 || app.order_state == 6 || app.order_state == 13) {
                    clearInterval(t);
                    $(".fk_button").attr("disabled",true);
                    $(".cancel_button").attr("disabled",true);
                    $("#state_box2").show();
                    $("#state_box1").hide();
                    $("#state_box3").hide();
                    clearInterval(dataTimer)
                    clearInterval(t)
                    $("#js_time").text("00:00:00")
                    $(".cancel_div").show();
                    $(".cancel_div #icon3").show();
                    $("#orderState").html("已取消");
                    clearTimeout(imTime);
                    if(json.must_img != 0) {
                        var str = json.img_text;
                        if(str != '') {
                            if(json.img_type == 1) {
                                var arr = str.split(",");
                                app.userName = arr[0];
                                app.card = arr[1];
                                app.bankName = arr[2];
                                $("#card").text(app.card);
                                $("#name").text(app.userName);
                                $("#bank_name").text(app.bankName);
                            } else {
                                app.src = str;
                                $("#ewmImg").attr("src", str);
                                $(".cancel_div").hide();
                            }
                        }
                    }
                } else if(app.order_state >= 2 && app.order_state < 9) {
                    app.state = 2;
                    clearInterval(t);
                    $(".fk_button").attr("disabled",false);
                    $(".cancel_button").attr("disabled",true);
                    $("#state_box2").show();
                    $("#state_box1").hide();
                    $("#state_box3").hide();
                    if(app.order_state==5){
                        if($(".fcTishi").hasClass("hide")){
                            $(".fcTishi").removeClass('hide');
                        }
                        if($("#alert_tc2").hasClass("hide")){
                            $(".mask").show();
                            $("#alert_tc2").removeClass('hide').show();
                        }
                    }
                    if(json.must_img != 0) {
                        var str = json.img_text;
                        if(str != '') {
                            if(json.img_type == 1) {
                                var arr = str.split(",");
                                app.userName = arr[0];
                                app.card = arr[1];
                                app.bankName = arr[2];
                                $("#card").text(app.card);
                                $("#name").text(app.userName);
                                $("#bank_name").text(app.bankName);
                            } else {
                                app.src = str;
                                $("#ewmImg").attr("src", str);
                                $(".cancel_div").hide();
                            }
                        }
                    }
                }
            },
            error: function(xhr, textStatus, errorThrown) {}
        });
    }

    function getDataWithTimer() {
        dataTimer = setInterval(function() {
            if(app.state==0){
                getBasicData();
            }else{
                var day = 0,
                    hour = 0,
                    minute = 0,
                    second = 0; //时间默认值
                if(app.down_time > 0) {
                    day = Math.floor(app.down_time / (60 * 60 * 24));
                    hour = Math.floor(app.down_time / (60 * 60)) - (day * 24);
                    minute = Math.floor(app.down_time / 60) - (day * 24 * 60) - (hour * 60);
                    second = Math.floor(app.down_time) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                }
                if(hour <= 0 && minute <= 0 && second <= 0) {
                    $(".cancel_div").show();
                    $(".cancel_div #icon2").show();
                    $("#orderState").html("已超时");
                    clearTimeout(imTime);
                    clearInterval(dataTimer);
                    $("#js_time").text("0:00:00")
                    return;
                }
                if(minute <= 9) minute = '0' + minute;
                if(second <= 9) second = '0' + second;
                $("#js_time").text(hour+":"+minute+":"+second)
                getBasicData();
            }
        }, 3000)
    }

    var that = app;
    var copy1T, copy2T, copy3T, copy4T, copy5T, copy6T, copy7T;
    var clipboard1 = new ClipboardJS('#copy1');
    clipboard1.on('success', function(e) {
        $("#copy1").html("复制成功")
        $("#copy1").addClass("dan")
        clearTimeout(copy1T);
        copy1T = setTimeout(function() {
            $("#copy1").html("复制卡号")
            $("#copy1").removeClass("dan")
        }, 2000)
        e.clearSelection()
    });
    var clipboard2 = new ClipboardJS('#copy2');
    clipboard2.on('success', function(e) {
        $("#copy2").html("复制成功")
        $("#copy2").addClass("dan")
        clearTimeout(copy2T);
        copy2T = setTimeout(function() {
            $("#copy2").html("复制姓名")
            $("#copy2").removeClass("dan")
        }, 2000)
        e.clearSelection()
    });
    var clipboard3 = new ClipboardJS('#copy3');
    clipboard3.on('success', function(e) {
        $("#copy3").html("复制成功")
        $("#copy3").addClass("dan")
        clearTimeout(copy3T);
        copy3T = setTimeout(function() {
            $("#copy3").html("复制单号")
            $("#copy3").removeClass("dan")
        }, 2000)
        e.clearSelection()
    });
    var clipboard4 = new ClipboardJS('#copy4');
    clipboard4.on('success', function(e) {
        $("#copy4").html("复制成功")
        $("#copy4").addClass("gray")
        clearTimeout(copy4T);
        copy4T = setTimeout(function() {
            $("#copy4").html("复制金额")
            $("#copy4").removeClass("gray")
        }, 2000)
        e.clearSelection()
    });
    var clipboard5 = new ClipboardJS('#copy5');
    clipboard5.on('success', function(e) {
        $("#copy5").html("复制成功")
        $("#copy5").addClass("gray")
        clearTimeout(copy5T);
        copy5T = setTimeout(function() {
            $("#copy5").html("复制")
            $("#copy5").removeClass("gray")
        }, 2000)
        e.clearSelection()
    });
    var clipboard6 = new ClipboardJS('#copy6');
    clipboard6.on('success', function(e) {
        $("#copy6").html("复制成功")
        $("#copy6").addClass("gray")
        clearTimeout(copy6T);
        copy6T = setTimeout(function() {
            $("#copy6").html("复制")
            $("#copy6").removeClass("gray")
        }, 2000)
        e.clearSelection()
    });
    var clipboard7 = new ClipboardJS('#copy7');
    clipboard7.on('success', function(e) {
        $("#copy7").html("复制成功")
        $("#copy7").addClass("gray")
        clearTimeout(copy7T);
        copy7T = setTimeout(function() {
            $("#copy7").html("复制")
            $("#copy7").removeClass("gray")
        }, 2000)
        e.clearSelection()
    });
    var clipboard14 = new ClipboardJS('#copy14');
    clipboard14.on('success', function(e) {
        e.clearSelection()
    });

    function formatDateTime(timeStamp) {
        var date = new Date();
        date.setTime(timeStamp * 1000);
        var y = date.getFullYear();
        var m = date.getMonth() + 1;
        m = m < 10 ? ('0' + m) : m;
        var d = date.getDate();
        d = d < 10 ? ('0' + d) : d;
        var h = date.getHours();
        h = h < 10 ? ('0' + h) : h;
        var minute = date.getMinutes();
        var second = date.getSeconds();
        minute = minute < 10 ? ('0' + minute) : minute;
        second = second < 10 ? ('0' + second) : second;
        return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
    }

    var t;
    $(document).ready(function() {
        $(".text_div").eq(0).show();
        var timeFun=null;
        timeFun=setTimeout(function(){
            if(app.state<2){
                $(".text_div").find("p").eq(0).html("支付通道拥塞，请重新提交支付！")
            }
        },30000)
        var url = "https://a.szfkks.cn/query/3865/23233134/1/1562427596/90477/4ed749df14611aa19c7a82761ecbb535";
        $("#order,#order_id").html("23233134");
        var img_index = 0;
        t = setInterval(function() {
            $(".img_box img").eq(img_index).show().siblings().hide();
            if(img_index < 4) {
                img_index++
            } else {
                img_index = 0;
            }
        }, 500)
        getBasicData();

        getDataWithTimer();
    })
    var $imPc = $("#importTc");
    var $fkTc = $("#fkTc");
    var $cancelTc = $("#cancelTc");
    var imTime = null;
    $('#importTc .close,#importTc .button').click(function() {
        $imPc.hide();
        // if(!$("#checkInp")[0].checked) {
        // 	setTimeout(function() {
        // 		$imPc.show();
        // 	}, 15000)
        // } else {
        // 	return false;
        // }
    })
    $fkTc.find('.close,.cancel_button').click(function() {
        $fkTc.hide();
        if(!(app.pay_type=="yunqr" || app.pay_type=="qqqr")){
            imTime=setTimeout(function(){
                $fkTc.show();
                $fkTc.find("#money3").val($("#money").text());
            },60000)
        }
    })
    $cancelTc.find('.close,.back').click(function() {
        $cancelTc.hide();
    })
    $cancelTc.find('.cancel').click(function() {
        //确认取消执行请求
        var that = $(this);
        if(that.attr("disabled")==true|| that.attr("disabled")=="disabled"){
            return;
        }
        var a = $(".select_div p.active .check_box");
        var reason = '';
        if(a.data("mode")==4){
            reason = $("#otherText").val();
        }else{
            reason = $(".select_div p.active label").text();
        }

        if(reason.length<1||reason.length>20){
            alert(a.data("mode")==4?"请输入取消理且不超过20个字符":"请选择取消理由");
            return;
        }

        that.attr("disabled",true);
        var d = {};
        d['order_id'] = app.order_id;
        d['send_login_id'] = app.send_login_id;
        d['recv_login_id'] = app.recv_login_id;
        d['reason'] = reason;
        $.ajax({
            type:"post",
            url:"https://a.szfkks.cn/cancel/3865/23233134/1/1562427596/90477/4ed749df14611aa19c7a82761ecbb535",
            data:d,
            dataType:'json',
            success:function(json){
                if(json.code==0){
                    $(".fk_button").attr("disabled",true);
                    $(".cancel_button").attr("disabled",true);
                    $("#state_box2").show();
                    $("#state_box1").hide();
                    $("#state_box3").hide();
                    $("#js_time").text("00:00:00");
                    clearInterval(dataTimer)
                    $(".cancel_div").show();
                    $(".cancel_div #icon3").show();
                    $("#orderState").html("已取消");
                    clearTimeout(imTime);
                    $cancelTc.hide();
                }else{
                    alert(json.msg)
                    that.attr("disabled",false);
                }
            },error:function(){
                alert("网络异常,请重试!");
                that.attr("disabled",false);
            }
        });
    })
    $fkTc.find('.button').click(function() {
        //确认已付款执行请求
        var that = $(this);
        if(that.attr("disabled")==true|| that.attr("disabled")=="disabled"){
            return;
        }
        var money = parseFloat($("#money3").val());
        if(isNaN(money) || money<1){
            alert("请输入正确的金额");
            return;
        }
//			var account_name = $("#account_name").val();
//			if(account_name.length<1 || account_name.length>20){
//				alert("请输入正确的账号或名字且不超过20个字符");
//				return;
//			}
        that.attr("disabled",true);
        var d = {};
        d['order_id'] = app.order_id;
        d['send_login_id'] = app.send_login_id;
        d['recv_login_id'] = app.recv_login_id;
        d['amount']	= money;
        d['name'] = "";
        $.ajax({
            type:"post",
            url:"https://a.szfkks.cn/confirm/3865/23233134/1/1562427596/90477/4ed749df14611aa19c7a82761ecbb535",
            data:d,
            dataType:'json',
            success:function(json){
                if(json.code==0){
                    $(".fk_button").attr("disabled",true);
                    $(".cancel_button").attr("disabled",true);
                    $("#state_box2").show();
                    $("#state_box3").hide();
                    $("#state_box1").hide();
                    $fkTc.hide();
                    clearInterval(imTime);
                    alertTc('付款后：记得删除相册中二维码,以免下次重复支付造成资金损失！','我知道了');
                    $("#orderState").html("待收款确认");
                    $(".cancel_div").show();
                    $(".cancel_div #icon4").show();
                }else{
                    alert(json.msg)
                    that.attr("disabled",false);
                }
            },error:function(){
                alert("网络异常,请重试!");
                that.attr("disabled",false);
            }
        });
    })

    $('.press_button').click(function() {
        //确认已付款执行请求
        var that = $(this);
        if(that.attr("disabled")==true|| that.attr("disabled")=="disabled"){
            return;
        }

        that.attr("disabled",true);
        var d = {};
        d['order_id'] = app.order_id;
        d['send_login_id'] = app.send_login_id;
        d['recv_login_id'] = app.recv_login_id;
        $.ajax({
            type:"post",
            url:"https://a.szfkks.cn/prompt/3865/23233134/1/1562427596/90477/4ed749df14611aa19c7a82761ecbb535",
            data:d,
            dataType:'json',
            success:function(json){
                alert(json.msg)
                if(json.code==0){
//						setTimeout(function(){
//							that.attr("disabled",false);
//						},15000)

                }else{
                    that.attr("disabled",false);
                }
            },error:function(){
                alert("网络异常,请重试!");
                that.attr("disabled",false);
            }
        });
    })

    $cancelTc.find('.select_div>p').click(function() {
        $(this).siblings().removeClass("active").find('.checkbox')[0].checked = false;
        $(this).addClass("active").find(".checkbox").checked = true;
        if($(this).index() != 3) {
            $("#otherText").val("");
            $("#otherText")[0].disabled = true;
        } else {
            $("#otherText")[0].disabled = false;
        }
    })
    $(".fk_button").click(function() {
        $fkTc.show();
        $fkTc.find("#money3").val($("#money").text());
    })

    $("#imLabel").click(function() {
        if(!$("#checkInp")[0].checked) {
            $(this).find(".check_icon").addClass("active");
        } else {
            $(this).find(".check_icon").removeClass("active");
        }
    })
    $(".fcTishi img").click(function(){
        $(".fcTishi").hide();
    })

    $(".moreBank").click(function(){
        $("#bankTc").show();
    })
    $("#bankTc .close").click(function(){
        $("#bankTc").hide();
    })
</script>

</html>